<!--
 * @FileDescription 基本状态查询
 * @Author 杨宇翔
 * @Date 20220530 20:41:47
 * @LastEditors 杨宇翔
 * @LastEditTime 20220530 20:41:47
-->
<template>
    <div class="base-information">
        <div class="container">
            <div class="header">
                <span>基本状态查询</span>
                <span class="material-icons"
                    @click="UsageForMillimeterWaveRadarComponent.Default.NavigateToPreviousAsync()">×</span>
            </div>
            <div class="content">
                <table>
                    <thead>
                        <th>配置项目</th>
                        <th>配置值</th>
                    </thead>
                    <tbody>
                        <tr>
                            <td>存储器读取状态</td>
                            <td>{{ MMWRSettings.Default.BaseInformation.NVMReadStatus }}</td>
                        </tr>
                        <tr>
                            <td>存储区写入状态</td>
                            <td>{{ MMWRSettings.Default.BaseInformation.NVMWriteStatus }}</td>
                        </tr>
                        <tr>
                            <td>雷达ID</td>
                            <td>{{ MMWRSettings.Default.BaseInformation.SensorID }}</td>
                        </tr>
                        <tr>
                            <td>目标检测类型</td>
                            <td>{{ MMWRSettings.Default.BaseInformation.OutputTypeCfg }}</td>
                        </tr>
                        <tr>
                            <td>最大检测距离</td>
                            <td>{{ MMWRSettings.Default.BaseInformation.MaxDistanceCfg }}</td>
                        </tr>
                        <tr>
                            <td>雷达功率</td>
                            <td>{{ MMWRSettings.Default.BaseInformation.RadarPowerCfg }}</td>
                        </tr>
                        <tr>
                            <td>发送目标质量信息</td>
                            <td>{{ MMWRSettings.Default.BaseInformation.SendQualityCfg }}</td>
                        </tr>
                        <tr>
                            <td>发送目标扩展信息</td>
                            <td>{{ MMWRSettings.Default.BaseInformation.SendExtInfoCfg }}</td>
                        </tr>
                        <tr>
                            <td>控制继电器</td>
                            <td>{{ MMWRSettings.Default.BaseInformation.CtrlRelayCfg }}</td>
                        </tr>
                        <tr>
                            <td>排序方式</td>
                            <td>{{ MMWRSettings.Default.BaseInformation.SortIndex }}</td>
                        </tr>
                        <tr>
                            <td>雷达灵敏度</td>
                            <td>{{ MMWRSettings.Default.BaseInformation.RcsThreshold }}</td>
                        </tr>
                        <tr>
                            <td>永久错误</td>
                            <td>{{ MMWRSettings.Default.BaseInformation.PersistentError }}</td>
                        </tr>
                        <tr>
                            <td>短暂错误</td>
                            <td>{{ MMWRSettings.Default.BaseInformation.TemporaryError }}</td>
                        </tr>
                        <tr>
                            <td>干扰检测</td>
                            <td>{{ MMWRSettings.Default.BaseInformation.Interference }}</td>
                        </tr>
                        <tr>
                            <td>温度报警</td>
                            <td>{{ MMWRSettings.Default.BaseInformation.TemperatureError }}</td>
                        </tr>
                        <tr>
                            <td>电压报警</td>
                            <td>{{ MMWRSettings.Default.BaseInformation.VoltageError }}</td>
                        </tr>
                        <tr>
                            <td>运动信息输入状态</td>
                            <td>{{ MMWRSettings.Default.BaseInformation.MotionRxState }}</td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
import MMWRSettings from "./ExamSettings";
import { UsageForMillimeterWaveRadarComponent } from './ExamComponent';
</script>

<style scoped>
.base-information {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;

    backdrop-filter: blur(1rem);
}

.container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    width: 62rem;
    height: 84rem;

    display: flex;
    flex-direction: column;
    align-items: stretch;

    border-radius: 2rem;
    border: solid 0.6rem transparent;
    background-image: linear-gradient(#131620, #131620),
        linear-gradient(90deg, #218cde, #807de1);
    background-origin: border-box;
    background-clip: content-box, border-box;
}

.header {
    width: 100%;

    padding: 2rem;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header>span:first-of-type {
    color: white;
    font-size: 2.4rem;
    font-weight: 500;
}

.header>.material-icons {
    color: #81859C;
    font-size: 3.6rem;
}

.content {
    padding-left: 4rem;
    padding-right: 4rem;
}

table {
    width: 100%;
}

th,
td {
    height: 4rem;
    font-size: 1.6rem;
}

th {
    color: #81859C;
}

td {
    color: #B1B1D4;
}

th:first-of-type {
    width: 60%;
}

th:last-of-type {
    width: 40%;
}

thead {
    position: relative;
}

thead::after {
    content: '';

    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    height: 0.1rem;

    background-color: #81859C1A;
}

td:last-of-type {
    text-align: center;
}
</style>